| Conditions | 2 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.0625 |
| Changes | 0 | ||
| 1 | import React from 'react'; |
||
| 26 | |||
| 27 | render() { |
||
| 28 | 3 | if (this.state.hasError) { |
|
| 29 | 1 | return ( |
|
| 30 | <div className="error-handler"> |
||
| 31 | <h1>Oops! This is awkward :S</h1> |
||
| 32 | <p>It seems that something went wrong. Try refreshing the page or just click this button.</p> |
||
| 33 | <br /> |
||
| 34 | <Button outline color="primary" onClick={() => location.reload()}>Take me back</Button> |
||
| 35 | </div> |
||
| 36 | ); |
||
| 37 | } |
||
| 38 | |||
| 39 | 2 | return this.props.children; |
|
| 40 | } |
||
| 44 |